<?php include 'header.php';?>
<div id="mainbody"  >
<div class="col-lg-9" id="charge">
    <table class="table table-bordered" id="work-table">
      <tr id="table-nav">
        <td>  学号</td>
        <td>  姓名</td>
        <td>签到时间</td>
        <td>所在岗位</td>
        <td>签退时间</td>
        <td>备注</td>
        <td>  操作</td>
      </tr>
 <?php
//	echo $timebegin=date("Y-m-d G:i:s");
	$m=date("G")-5;
	$m1=date("G")+1;
	$timest=date("y-m-d")." ".$m.":".date("i:s");
	$timelt=date("y-m-d")." ".$m1.":".date("i:s");
//	echo 't0'.$timest;
//	echo 't1'.$timelt;
//	echo '999'.$_SESSION['usercode'];
	$sql1="select newspapers.studentid,studentname,newspapers.timebegin,station.stationname from allstudent,newspapers,station where newspapers.studentid=allstudent.studentid and newspapers.stationid=station.stationid and newspapers.teachid is NULL";
	$res = mysql_query($sql1);
	$weekarray=array("日","一","二","三","四","五","六");
	$day="星期".$weekarray[date("w")];
//	echo $day;
while($row=mysql_fetch_array($res)){
echo <<<HT
          				<tr id="table-nav">
          				<td>$row[0]</td>
          				<td>$row[1]</td>
          				<td> $row[2]</td>
          				<td>$row[3]</td>
          				<td> </td>
          				<td></td>
          				<td><a href="confirmsign.php?station=$row[3]&name=$row[1]&sid=$row[0]&stime=$row[2]">确认 </a></td>
          				</tr>			
HT;

}
	$sql1="select timecount.studentid,studentname,timecount.timebegin,station.stationname from allstudent,timecount,station where timecount.studentid=allstudent.studentid and timecount.stationid=station.stationid and timecount.teachid is NULL";
	$res = mysql_query($sql1);
	while($row=mysql_fetch_array($res)){
	echo <<<HT
          				<tr id="table-nav">
          				<td>$row[0]</td>
          				<td>$row[1]</td>
          				<td> $row[2]</td>
          				<td>$row[3]</td>
          				<td> </td>
          				<td></td>
          				<td><a href="confirmsign.php?station=$row[3]&name=$row[1]&sid=$row[0]&stime=$row[2]">确认 </a></td>
          				</tr>			
HT;

}

    $sql1="select computebysize.studentid,studentname,computebysize.timebegin,station.stationname from allstudent,computebysize,station where computebysize.studentid=allstudent.studentid and computebysize.stationid=station.stationid and computebysize.teachid is NULL";
	$res = mysql_query($sql1);
while($row=mysql_fetch_array($res)){
echo <<<HT
          				<tr id="table-nav">
          				<td>$row[0]</td>
          				<td>$row[1]</td>
          				<td> $row[2]</td>
          				<td>$row[3]</td>
          				<td> </td>
          				<td></td>
          				<td><a href="confirmsign.php?station=$row[3]&name=$row[1]&sid=$row[0]&stime=$row[2]">确认 </a></td>
          				</tr>			
HT;

}
$sql1="select bookmanage.studentid,studentname,bookmanage.timebegin,station.stationname from allstudent,bookmanage,station where bookmanage.studentid=allstudent.studentid and bookmanage.stationid=station.stationid and teachid is NULL";
	$res = mysql_query($sql1);
while($row=mysql_fetch_array($res)){
echo <<<HT
          				<tr id="table-nav">
          				<td>$row[0]</td>
          				<td>$row[1]</td>
          				<td> $row[2]</td>
          				<td>$row[3]</td>
          				<td> </td>
          				<td></td>
          				<td><a href="confirmsign.php?station=$row[3]&name=$row[1]&sid=$row[0]&stime=$row[2]">确认 </a></td>
          				</tr>			
HT;

}
	$sql1="select roommanage.studentid,studentname,roommanage.timebegin,station.stationname from allstudent,roommanage,station where roommanage.studentid=allstudent.studentid and roommanage.stationid=station.stationid and roommanage.teachid is NULL";
	$res = mysql_query($sql1);
while($row=mysql_fetch_array($res)){
echo <<<HT
          				<tr id="table-nav">
          				<td>$row[0]</td>
          				<td>$row[1]</td>
          				<td> $row[2]</td>
          				<td>$row[3]</td>
          				<td> </td>
          				<td></td>
          				<td><a href="confirmsign.php?station=$row[3]&name=$row[1]&sid=$row[0]&stime=$row[2]">确认 </a></td>
          				</tr>			
HT;

}

?>
   </table>
</div>

 <div class="col-lg-3" id="left-bar">
      <div class="list-group">
     <a href="#" class="list-group-item active">快捷菜单</a>
       <div id="mainbody"  >
<div class="col-lg-10" id="charge">
<form action="../control/signin.php" method="post">
<br>
<input type="text" name="sid">

   <input type="submit" name="submit" value="确定">
</form>
   </div>

 </div>
</div>